package com.atguigu.test.easyexcel;

import java.util.ArrayList;
import java.util.List;

public class EasyExcelWrite {
    public static void main(String[] args) {
        String filename = "D:\\0728.xlsx";
        com.alibaba.excel.EasyExcel.write(filename,Stu.class).sheet("写操作").doWrite(getData());
    }

    private static List<Stu> getData (){
        List<Stu> list = new ArrayList<>();
        for (int i = 0; i <10 ; i++) {
            Stu data = new Stu();
            data.setSid(i);
            data.setSname("飞飞"+i);
            list.add(data);
        }
        return list;
    }
}
